home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 26 / AACD 26.iso / AACD / Programming / ace_gpl_release / src / lib / c / scrfunc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-10-04  |  1.5 KB  |  53 lines

  1. /*
  2. ** ACE run-time library module: SCREEN(n) function.
  3. ** Copyright (C) 1998 David Benn
  4. ** 
  5. ** This program is free software; you can redistribute it and/or
  6. ** modify it under the terms of the GNU General Public License
  7. ** as published by the Free Software Foundation; either version 2
  8. ** of the License, or (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program; if not, write to the Free Software
  17. ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  18. **
  19. ** Author: David J Benn
  20. **   Date: 28th August 1994
  21. */
  22.  
  23. #include <exec/types.h>
  24. #include <intuition/intuition.h>
  25.  
  26. /* externals */
  27. extern    struct Window *Wdw;    
  28. extern    struct Screen *Scrn;
  29. extern    struct RastPort *RPort;
  30. extern    struct ViewPort *ViewPort;
  31.  
  32. /* functions */
  33. LONG screenfunc(n)
  34. LONG n;
  35. {
  36. /* 
  37. ** Return information about active screen/current output window (0,2).
  38. */
  39.  
  40.     switch(n)
  41.     {
  42.         case 0L :    return (LONG)Wdw;
  43.         case 1L :    return (LONG)Scrn;
  44.         case 2L :    return (LONG)RPort;
  45.         case 3L :    return (LONG)ViewPort;
  46.         case 4L :    return (LONG)&(Scrn->BitMap);
  47.         case 5L :    return (LONG)Scrn->RastPort.Font->tf_XSize;
  48.         case 6L :    return (LONG)Scrn->RastPort.Font->tf_YSize;
  49.         default:     return 0L;
  50.                 break;
  51.     }
  52. }
  53.